<template>
  <view class="wrap">
    <view style="margin: 30rpx 0">
      <uni-icons custom-prefix="iconfont" type="icon-interchange" size="48" color="#F20710"></uni-icons>
    </view>
    <up-text text="兑换成功" type="" :bold="true" color="#F20710" size="32" margin="0 0 60rpx" align="center"></up-text>
    <view style="width: 300px">
      <up-text :text="`订单编号： ${orderNum}`" type="main" margin="0 0 60rpx"></up-text>
      <up-text :text="`下单时间： ${createTime}`" type="main" margin="0 0 60rpx"></up-text>
      <up-text text="兑换方式： 积分兑换" type="main" margin="0 0 60rpx"></up-text>
      <up-line></up-line>
      <view class="row" style="margin: 60rpx 0;">
        <view>
          <up-text text="实付积分：" type="main"></up-text>
        </view>
        <up-text :text="point" type="main" :bold="true"></up-text>
      </view>
    </view>
    <view style="margin-top: 200rpx; width: 180rpx;">
      <up-button type="primary" text="返回积分商城" @click="goPointsMall"></up-button>
    </view>
  </view>
</template>

<script>

export default {
  onLoad(options) {
    this.createTime = options.createTime;
    this.orderNum = options.orderId;
    this.point = options.totalPrice;
  },
  data() {
    return {
      orderNum: '',
      createTime: '',
      point: '0.00',
    }
  },
  methods: {
    goPointsMall() {
      uni.switchTab({
        url: '/pages/pointsMall/index',
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
</style>
